
SRCDIRS = . ../common
SRCEXTS = .c .cpp
HDREXTS = .h .hpp
SOURCES = $(foreach d,$(SRCDIRS),$(wildcard $(addprefix $(d)/*,$(SRCEXTS))))
HEADERS = $(foreach d,$(SRCDIRS),$(wildcard $(addprefix $(d)/*,$(HDREXTS))))
OBJS    = $(addsuffix .o, $(basename $(SOURCES)))
DEPS    = $(OBJS:.o=.d)

all:xbase-lib.tar.gz

xbase-lib.tar.gz:$(OBJS)
	./create_xbaselib.sh

%.o:%.cpp %.hpp
	g++ -c -o $@ $< -I.. -I../common -ggdb -Wall -Wno-deprecated -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2

clean:
	rm $(OBJS) xbase-lib.tar.gz 
